home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 34.zip
/
BS1 part 34
/
FredFish PD 312.adf
/
TrackSalve
/
Source
/
ts.h
< prev
next >
Wrap
C/C++ Source or Header
|
1990-02-12
|
3KB
|
88 lines
#define exit(i) XCEXIT(i)
#define TSSEMAPHORENAME "TrackSalve Data Hook"
#define TD_VERSION1_2 33
#define TD_REVISION1_2 127
#define TD_VERSION1_3 34
#define TD_REVISION1_3 1
#define PUBCLR (MEMF_PUBLIC|MEMF_CLEAR)
/* Program return codes */
#define ZERO 0
#define WARNING 5
#define SERIOUS 10
#define FAILURE 20
/* Secondary result codes */
#define E_CMDLINE -41
#define E_ALLOCMEM -42
#define E_INTUITION -43
#define E_RTAG -44
#define E_TD_VERSION -45
#define E_LOSTPC -47
/*-- The findable structure. We put it in the semaphore list. */
struct TSHook{
struct SignalSemaphore TSH_Semaphore;
struct TSControl *TSH_TSControl;
ULONG TSH_Version;
};
/*-- The UnitData structure contains data of interest for a Trackdisk unit task. */
struct UnitData{
struct IOExtTD UD_TDReq;
struct TSControl *UD_TSControl;
char *UD_ReturnTD;
APTR UD_Userdata;
UBYTE UD_Cmd0;
UBYTE UD_Cmd1;
UWORD UD_SavedL;
UWORD UD_SavedD;
};
/*-- The global control structure. It contains data concerning shared items between all TD-tasks. */
struct TSControl{
struct TSHook *TSC_TSHook;
struct UnitData *TSC_UnitData[NUMUNITS];
struct UnitData TSC_UDAlloc[NUMUNITS];
struct Resident *TSC_TDTag;
ULONG TSC_TDCodeSize;
struct Resident *TSC_TSTag;
char *TSC_TSCode;
ULONG TSC_TSCodeSize;
char *TSC_Buffer;
UBYTE TSC_InUse;
UBYTE TSC_Salve;
UBYTE TSC_Verify;
UBYTE TSC_AvailUnits;
struct SignalSemaphore TSC_OwnBuffer;
struct Library *TSC_IntuBase;
ULONG TSC_Size;
};
/* Bits of the UD_Command, UD_PreCmd and UNIT_pad */
#define B_READONLY 0
#define F_READONLY (1<<B_READONLY)
#define B_NOCLICK 1
#define F_NOCLICK (1<<B_NOCLICK)
#define B_SALVE 2
#define F_SALVE (1<<B_SALVE)
#define B_VERIFY 3
#define F_VERIFY (1<<B_VERIFY)
#define B_RAM 6
#define F_RAM (1<<B_RAM)
#define B_TERM 7
#define F_TERM (1<<B_TERM)
#define FUNCTIONS (F_RAM+F_VERIFY+F_SALVE+F_NOCLICK+F_READONLY)